package com.moody.hibernate.domain;

import java.text.DecimalFormat;

/**
 * CustLimit entity. @author MyEclipse Persistence Tools
 */

public class CustLimit implements java.io.Serializable {

	// Fields

	private String serialNo;
	private String custId;
	private String custName;
	private Double pdfactor;
	private Double solventFactor;
	private Double industryFactor;
	private Double regionFactor;
	private Double netAsset;
	private Double obbalance;
	private Double initLimit;
	private Double pdlimit;
	private Double rlimit;
	private Double finalLimit;
	private String finalLimitString;
	private String remark;
	private String updateUserId;
	private String updateOrgId;
	private String updateDate;
	
	public static final String PDPARAM = "单一客户最大损失";
	public static final String RPARAM = "银行资本净额";
	
	private Double debtBalance;

	// Constructors

	public Double getDebtBalance() {
		return debtBalance;
	}

	public void setDebtBalance(Double debtBalance) {
		this.debtBalance = debtBalance;
	}

	/** default constructor */
	public CustLimit() {
	}

	/** minimal constructor */
	public CustLimit(String serialNo, String custId) {
		this.serialNo = serialNo;
		this.custId = custId;
	}

	/** full constructor */
	public CustLimit(String serialNo, String custId, String custName,
			Double pdfactor, Double solventFactor, Double industryFactor,
			Double regionFactor, Double netAsset, Double obbalance,
			Double initLimit, Double pdlimit, Double rlimit, Double finalLimit,
			String remark, String updateUserId, String updateOrgId,
			String updateDate) {
		this.serialNo = serialNo;
		this.custId = custId;
		this.custName = custName;
		this.pdfactor = pdfactor;
		this.solventFactor = solventFactor;
		this.industryFactor = industryFactor;
		this.regionFactor = regionFactor;
		this.netAsset = netAsset;
		this.obbalance = obbalance;
		this.initLimit = initLimit;
		this.pdlimit = pdlimit;
		this.rlimit = rlimit;
		this.finalLimit = finalLimit;
		this.remark = remark;
		this.updateUserId = updateUserId;
		this.updateOrgId = updateOrgId;
		this.updateDate = updateDate;
	}

	// Property accessors

	public String getSerialNo() {
		return this.serialNo;
	}

	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}

	public String getCustId() {
		return this.custId;
	}

	public void setCustId(String custId) {
		this.custId = custId;
	}

	public String getCustName() {
		return this.custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public Double getPdfactor() {
		return this.pdfactor;
	}

	public void setPdfactor(Double pdfactor) {
		this.pdfactor = pdfactor;
	}

	public Double getSolventFactor() {
		return this.solventFactor;
	}

	public void setSolventFactor(Double solventFactor) {
		this.solventFactor = solventFactor;
	}

	public Double getIndustryFactor() {
		return this.industryFactor;
	}

	public void setIndustryFactor(Double industryFactor) {
		this.industryFactor = industryFactor;
	}

	public Double getRegionFactor() {
		return this.regionFactor;
	}

	public void setRegionFactor(Double regionFactor) {
		this.regionFactor = regionFactor;
	}

	public Double getNetAsset() {
		return this.netAsset;
	}

	public void setNetAsset(Double netAsset) {
		this.netAsset = netAsset;
	}

	public Double getObbalance() {
		return this.obbalance;
	}

	public void setObbalance(Double obbalance) {
		this.obbalance = obbalance;
	}

	public Double getInitLimit() {
		return this.initLimit;
	}

	public void setInitLimit(Double initLimit) {
		this.initLimit = initLimit;
	}

	public Double getPdlimit() {
		return this.pdlimit;
	}

	public void setPdlimit(Double pdlimit) {
		this.pdlimit = pdlimit;
	}

	public Double getRlimit() {
		return this.rlimit;
	}

	public void setRlimit(Double rlimit) {
		this.rlimit = rlimit;
	}

	public Double getFinalLimit() {
		return this.finalLimit;
	}

	public void setFinalLimit(Double finalLimit) {
		this.finalLimit = finalLimit;
		
		DecimalFormat df = new DecimalFormat("###,##0.00");
		String itemValueString = null ;
		if(finalLimit!=null){
			itemValueString = String.valueOf(df.format(finalLimit));
			//itemValueString = itemValueString.replaceAll(",","");  
			
		}
		this.finalLimitString = itemValueString;
	}

	public String getFinalLimitString() {
		return finalLimitString;
	}

	public void setFinalLimitString(String itemValueString) {
		this.finalLimitString = itemValueString;
		if(itemValueString != null)
			itemValueString = itemValueString.replaceAll(",","");  
			this.finalLimit = Double.valueOf(itemValueString);
	}
	
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getUpdateUserId() {
		return this.updateUserId;
	}

	public void setUpdateUserId(String updateUserId) {
		this.updateUserId = updateUserId;
	}

	public String getUpdateOrgId() {
		return this.updateOrgId;
	}

	public void setUpdateOrgId(String updateOrgId) {
		this.updateOrgId = updateOrgId;
	}

	public String getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}

}